﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Views/Shared/Blog.Master" CodeBehind="Default.aspx.cs" Inherits="VladanStrigoNET.Samples.Blogged.Views._Default" %>
<%@ Import namespace="VladanStrigoNET.Samples.Blogged.Controllers"%>
<%@ Import namespace="VladanStrigoNET.Samples.Blogged.Models"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>List posts</h1>
<% foreach(Post post in ViewData) { %>
<h2><%= Html.ActionLink<BlogController>(x => x.ShowPost(post.Id), post.Title) %></h2>
<h3>Posted at: <%= post.PostedOn %></h3>
<p><%= post.Body %></p>
<p><%= Html.ActionLink<BlogController>(x => x.Delete(post.Id), "Delete") %></p>
<% } %>
</asp:Content>
